package cn.wolfcode.trip.base.domain;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 问答社区的问题类
 */
@Setter@Getter
public class Question extends BaseDomain{

    public static final int STATE_UNSOLVED = 1;
    public static final int STATE_SOLVE = 2;

    private String title;//问题标题

    private Region region;//问题所属的地区

    private User user;//提问人

    private Date createTime;//问题创建时间

    private String detail;//问题内容

    private Integer state;//是否解决

    private Integer viewCount;//浏览数

    public String getStateName(){
        if (state==STATE_UNSOLVED) {
            return "";
        }
        return "[已解决]";
    }

}